<?php

use Phinx\Migration\AbstractMigration;

class AddStatusColumnInContractTable extends AbstractMigration
{

    public function up()
    {
        $this->table("contract")
            ->addColumn("status", 'enum', [
                'values' => "wait_for_sign,signed,early_terminated,terminated",
                'default' => 'wait_for_sign',
                'comment' => '合同状态',
                'null' => false
            ])->save();
    }

    public function down()
    {
        $this->table("contract")->removeColumn("status")->save();
    }
}
